package polymorphism;

public class Dog extends Animal{
    public Dog(){}
    //调用父类的有参构造，若父类无无参构造，super调用父类有参构造
    public Dog (String name,int age){
        super(name,age);
    }
    public void eat(String food){
        System.out.println(this.name+"正在吃"+food);
    }
}
